Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return slugs in find methods #443

Merged
merged 3 commits into from
Jan 25, 2023
Merged

Return slugs in find methods #443

merged 3 commits into from
Jan 25, 2023

Conversation

falconsmilie
Copy link
Contributor

#437

I assume if a "name" is in slug format, that the slug will be the same as the name?!

Assumption aside, I don't see any side effects for methods like findOrCreateFromString which call these changed functions.

I assume if a "name" is in slug format, that the slug will be the same as the name?!

Assumption aside, I don't see any side effects for methods like `findOrCreateFromString` which call these changed functions.
@freekmurze
Copy link
Member

The tests are failing for this one, could you take a look?

@falconsmilie
Copy link
Contributor Author

i get the same fails locally when running the test without any changes. I tried to trigger the tests again here, but seems they were skipped with no diff.

@freekmurze
Copy link
Member

I've fixed the tests on main. Could you rebase this PR?

Switch to anonymous migration and void return type for up method (spatie#440)

Method for reversing migrations (spatie#442)

* Method for reversing migrations

* Add missing return type declaration

wip

Update README.md

fix tests

Fix styling

Update CHANGELOG

Return slugs in find methods

I assume if a "name" is in slug format, that the slug will be the same as the name?!

Assumption aside, I don't see any side effects for methods like `findOrCreateFromString` which call these changed functions.

Revert changes to test tests :S

allow find from string methods to search slug field
@falconsmilie
Copy link
Contributor Author

I've pushed some changes, all tests pass locally.

@freekmurze freekmurze merged commit 490a882 into spatie:main Jan 25, 2023
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants